package pl.com.qapps.datastore.berkeley;

import com.sleepycat.je.DatabaseException;

/**
 * 
 * @author Jakub Dykowski
 *
 */
abstract class ArtificialEnv {

	public ArtificialEnv() {
	}

	public abstract void setUp(Store ds) throws DatabaseException;

	public abstract void cleanUp(Store ds) throws DatabaseException;

	public ArtificialEnv init(Store ds) throws DatabaseException {
		setUp(ds);
		return this;
	}

	public ArtificialEnv close(Store ds) throws DatabaseException {
		cleanUp(ds);
		return this;
	}
}
